close all;
clear;
%% 输入文件名
Name = 'B4-ROT';
fileLocation = 'E:\Documents\Onedrive\OneDrive - eyinwei\资料\研究生\撰写工作\【400】第四篇论文汇总 BIC\【460】实验\【461】0404TDS 测量';

fileNameStrRef = [fileLocation, '\', Name, '-ref-SampleSpectrum.csv'];
Ref = importdata(fileNameStrRef);

fileNameStrSample = [fileLocation, '\', Name, '-SampleSpectrum.csv'];
Samp = importdata(fileNameStrSample);

Fre = Samp.data(:, 1);
sampReflectance = Samp.data(:, 2);
refReflectance = Ref.data(:, 2);
Absorption = 1 - (sampReflectance ./ refReflectance).^2;
YW_Plot_Fast({Fre,sampReflectance,Fre,refReflectance},{'g','b'},["Samp",'Ref']);
xlim([0.4 2]);
YW_Plot_Fast({Fre, Absorption}, {'r'},[Name],["Frequency (THz)",'Amplitude']);
xlim([0.4 1.4]);
